#!/bin/sh

# this script keeps the collector running if it stops for some reason
# simple and inelegant but functional.

# replace DIR with wherever you are installing this
DIR=/var/www/html/energy/collector

cd $DIR

while true
do
	./read_watts_power.pl 2>&1 | logger -t watts
	sleep 2
done
